package io.other_stream;

import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

public class Print_Writer {
    public static void main(String[] args) throws IOException {
        //字符打印流
        //自动刷新
        PrintWriter pw = new PrintWriter(new FileWriter("wzx.txt"),true);
        pw.println(1000);
        pw.println(3.123456789);
        pw.println(9999);
        pw.println(true);
        pw.println(false);

        //只有println  printf format能够自动刷新

        //pw.flush();
        //pw.close();

    }
}
